<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
     .show{
         disbaled:"disabled";
     }
</style>
<body>
    <button class="btn"  >点击事件</button>
    <script>
        //迭代器,遍历元素，true表示迭代完成！！
        let arr=["我","唐玮","sge","彩霞"];
        ////以元素的key遍历
    //     let keys=arr.keys();
    // //    console.log(keys.next());//{value: 0, done: false}
    // while(({value,done}=keys.next()) && done==false){
    //         console.log(arr[value]);
    // }


    //以value的形式遍历

    let values=arr.values();
    while(({value,done}=values.next()) && done==false){

        console.log(value);
    }

    //entries迭代
    console.log(arr.entries().next());//{value: Array(2), done: false}
    for (const  [key,value] of arr.entries()) {
        console.log(key+"-->"+value);
    }

    let btn= document.querySelector(".btn");
    console.log(btn);
    btn.addEventListener("click",()=>{
       btn.classList.toggle("show")
      
    })
       </script>
</body>
</html>